﻿using Framework.Attribute;
using Framework.Utils;
using UnityEngine;

using UnityInput =UnityEngine.Input;

namespace Game.Input
{
    
    
    public class InputPC : InputBase
    {
        protected override void CheckInputEvent()
        {
            float x = 0;
            float y = 0;
            bool isMoving = false;
            if (UnityInput.GetKey("w"))
            {
                y = 1f;
                isMoving = true;
            }
            else if(UnityInput.GetKey("s"))
            {
                y = -1f;
                isMoving = true;
            }
            else if(UnityInput.GetKey("a"))
            {
                x = -1f;
                isMoving = true;
            }
            else if (UnityInput.GetKey("d"))
            {
                x = 1f;
                isMoving = true;
            }
            
            MoveDirChg(x,y,isMoving);
            
        }
    }
}